﻿@{
    ViewBag.Title = "Tree";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

    <form id="form1" runat="server">
        <div id="tree"></div>
    </form>
    <script type="text/javascript">
        var appID = '@Request.QueryString["appid"]';
        var tabID = '@Request.QueryString["tabid"]';
        var roadTree = null;
        $(function ()
        {
            roadTree = new RoadUI.Tree({ id: "tree", path: "Tree1", refreshpath: "TreeRefresh", onclick: openUrl });
        });
        function openUrl(json)
        {
            parent.frames[1].location = "List?dirid=" + json.id + "&appid=" + appID + "&tabid=" + tabID;
        }
        function reLoad(id)
        {
            roadTree.refresh(id);
        }
    </script>
